of

public static Rect of(int width, int height)

Returns the Rect instance for the given width and height values.

Throws

when width or height is negative


public static Rect of(int x, int y, int width, int height)

Returns the Rect instance for the given x, y, width, and height values.

Throws

when width or height is negative


public static Rect of(Size size)

Returns the Rect instance for the empty origin and the given size value.


public static Rect of(Point origin, Size size)

Returns the Rect instance for the given origin and size values.